import os
import sys
import configparser


def get_config(group, key):
    config = configparser.ConfigParser()
    config.read(get_path('config.ini'))
    return config[group][key]

def get_path(file_name):
    main_dir = os.path.dirname(os.path.abspath(__file__))
    project_root = os.path.abspath(os.path.join(main_dir, '..'))
    bundle_dir = getattr(sys, '_MEIPASS', os.path.abspath(os.curdir))
    return os.path.join(project_root, file_name)
